<?php
namespace Animal;

class Cat extends Animal
{
    private $type;

    public function __construct($name, $color, $type)
    {
        parent::__construct($name, $color);
        $this->type = $type;
    }

    public function __get($name)
    {
        return $this->$name;
    }

    public function eat()
    {
        echo 'A ' . $this->color . ' ' . $this->type . ' called ' . $this->name . ' is eating a fish now' . '<br/>';
    }

    public function play()
    {
        echo 'A ' . $this->color . ' ' . $this->type . ' called ' . $this->name . ' is playing with a fish now' . '<br/>';
        echo 'miao, I will catch you!!' . '<br/>';
    }

    public function sleep()
    {
        echo 'A ' . $this->color . ' ' . $this->type . ' called ' . $this->name . ' is sleeping now';
    }

    public function toBeKill()
    {
        echo 'A ' . $this->color . ' ' . $this->type . ' called ' . $this->name . ' is being killed now' . '<br/>';
        echo 'miao, you will not kill me bitch!!' . '<br/>';
    }
}